<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>天算主机 | WordPress香港、日本、美国免备案主机空间</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta name="renderer" content="webkit">
  <meta name="force-rendering" content="webkit">
  <link rel="stylesheet" href="css/bootstrap.css">
  <link rel="stylesheet" href="css/reset.css">
  <link rel="stylesheet" href="css/fonts/iconfont.css">
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" type="text/css" href="css/reg.css">
  <link rel="stylesheet" href="css/swiper.min.css">
  <script src="js/swiper.min.js"></script>
  <style type="text/css">
    .row_list {
      margin-bottom: 3px;
    }
    .wjmm{
      cursor: pointer;
    }
    .youce{
      margin-top:14%;
    }
  </style>
</head>
<body>
  <div class="head">
    <div class="container nav-box">
       <div class="logo">
        <a href="./index.html">
          <img src="images/skysuan.png" alt="天算主机">
        </a>
      </div>
      <div class="nav">
        <ul>
          <li><a href="./hosting.html">虚拟主机</a></li>
          <li><a href="./diy-hosting.html">弹性主机</a></li>
          <li><a href="./vps.html">VPS</a></li>
          <li><a href="./servers.html">服务器</a></li>
          <li><a href="./aboutus.html">关于我们</a></li>
          <li><a href="./control.html">控制器</a></li>
          <li class="c"></li>
        </ul>
      </div>
      <div class="user">       
        <a href="log.html" class="r l"><span>会员</span>登陆</a>
        <!-- <a href="reg.html" class="l">注册</a> -->
        <a href="reg.html">注册</a>
      </div>
      <hr class="c">
    </div>
    <div class="c"></div>
  </div>

  <!-- content开始 -->
  <div class="log_content">
    <div class="reg_content_lf">
      <div class="swiper-container">
        <div class="swiper-wrapper">
          <div class="swiper-slide"><img src="images/TB1FIjgQFXXXXaoaXXXXXXXXXXX-760-570.png"></div>
          <div class="swiper-slide"><img src="images/TB1nt1oRpXXXXbFapXXXXXXXXXX-760-570.png"></div>
          <div class="swiper-slide "><img src="images/TB1pm9lRpXXXXcoapXXXXXXXXXX-760-570.png"></div>
          <div class="swiper-slide "><img src="images/TB1WlSIRpXXXXcGXVXXXXXXXXXX-760-570.png"></div>
        </div>
      </div>
    </div>  
    <div class="reg_content_rt">

      <div class="row youce">

        <div class="col-xs-12 row_list">
          <div class="input-group">
            <span class="input-group-addon" id="phone">邮&emsp;箱</span>
            <input type="text" class="form-control email_val" value="" placeholder="请输入邮箱">     
          </div>
        </div>

        <div class="col-xs-12 row_list">
          <div class="input-group">
            <span class="input-group-addon" id="passworld1">密&emsp;码</span>
            <input type="password" class="form-control pwd" placeholder="请输入密码">
          </div>
        </div>

        <div class="col-xs-12 row_list row_list_reg login_butt">

          <input type="button" class="form-control" value="登录">

        </div>

        <div class="col-xs-12 row_list wjmm">
          <a href="regagain.html">忘记密码</a>
          
        </div>
      </div>
    </div>
    <div class="clear"></div>
    

  </div>
  <!-- content结束 -->
  <iframe src="foot.html" id="foot"></iframe>
</body>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/config.js"></script>

<script>

   // var getuser_name = localStorage.getItem('user_name');
   // localStorage.removeItem("user_name");
   // if(getuser_name==null){

   // }else if(getuser_name!==''||getuser_name!==null){
   //   $('.user .r').html('欢迎您：'+getuser_name);
   // }

   var getuser_name= $.cookie('user_name');
   console.log(getuser_name);
   if(getuser_name==undefined||getuser_name=='null'){
    $('.user .r').html('会员登陆');
  }else if(getuser_name!=''||getuser_name!='null'||getuser_name!='undefined'){    
    $('.user .r').html('欢迎您：'+getuser_name);
  }


    $('.login_butt').click(function(){
     var password_value=$(".pwd").val();
     var emailvalue=$(".email_val").val();
     console.log(password_value+emailvalue);
      if(emailvalue==''){
          alert('请输入邮箱！');          
      } else if(password_value==''){
            alert('请输入密码！');
            }
        else{
              $.ajax({
                type:'POST',
                url:config.restRoute.login,
                data:{
                  user_email:emailvalue,
                  user_passworld:password_value                 
                },
                success:function(response,status,xhr){
                  console.log(response);
                  var json_resp=JSON.parse(response);
                  if(json_resp.success=='1'){
                    var user_name=json_resp.body.user_name;
                    $.cookie('user_name', user_name, { expires: 7 });;

                    // localStorage.setItem('user_name', user_name);
                    window.location.href="http://localhost/www.laoxuehost.com/index.html"                    
                  }else if(json_resp.success=='0'){
                    alert('用户名或密码错误');
                  }
                }        
              });
            } 
         
    });



</script>

<script type="text/javascript">
  var mySwiper = new Swiper('.swiper-container',{
    loop: true,
    autoplay: 3000,
  });
</script>
</html>